From: Richard M. Stallman Date: Sun, 1 May 1994 22:56:54 +0000 (+0000) Subject: (perform-replace): Call substitute-command-keys just once X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~91804 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=02d95a278d988d0b53d2b4759f36860380348e65;p=emacs.git (perform-replace): Call substitute-command-keys just once and only if querying. --- diff --git a/lisp/replace.el b/lisp/replace.el index d51be301266..65818667ede 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -467,7 +467,11 @@ which will run faster and probably do exactly what you want." (next-rotate-count 0) (replace-count 0) (lastrepl nil) ;Position after last match considered. - (match-again t)) + (match-again t) + (message + (if query-flag + (substitute-command-keys + "Query replacing %s with %s: (\\\\[help] for help) ")))) (if (stringp replacements) (setq next-replacement replacements) (or repeat-count (setq repeat-count 1))) @@ -525,9 +529,7 @@ which will run faster and probably do exactly what you want." ;; which means it has finished handling this occurrence. (while (not done) (replace-highlight (match-beginning 0) (match-end 0)) - (message (substitute-command-keys - "Query replacing %s with %s: (\\\\[help] for help) ") - from-string next-replacement) + (message message from-string next-replacement) (setq key (read-event)) (setq key (vector key)) (setq def (lookup-key map key))